Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hoe #254

Merged
merged 4 commits into from
Dec 11, 2023
Merged

Add hoe #254

merged 4 commits into from
Dec 11, 2023

Conversation

fluffyloafie
Copy link
Member

@fluffyloafie fluffyloafie commented Dec 8, 2023

  • Dirt -> Farmland
  • Coarsed -> Dirt
  • Rooted -> Dirt + drop Roots

@fluffyloafie fluffyloafie added the feature When we dev a new feature label Dec 8, 2023
@fluffyloafie fluffyloafie self-assigned this Dec 8, 2023
Copy link

cloudflare-workers-and-pages bot commented Dec 9, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: f7a350d
Status: ✅  Deploy successful!
Preview URL: https://99d3447d.cubic-server.pages.dev
Branch Preview URL: https://item-hoe.cubic-server.pages.dev

View logs

From cauldron to hanging roots (blockID/itemID problem)
@@ -1032,6 +1032,15 @@ void Player::_onPlayerAction(protocol::PlayerAction &pck)
Event::cancelBlockDestroy(this, this->getDimension()->getLevel().getChunkColumnFromBlockPos(pck.location.x, pck.location.z).getBlock(pck.location), pck.location);
return;
}
auto item = this->_inventory->hotbar().at(this->_heldItem).getUsableItemFromSlot();
Copy link
Member

@Trompettesib Trompettesib Dec 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be improved to handle multiple items.

if (usedItem->_usabilityType == Items::UsabilityType::RightMouseClickUsable) {
usedItem->onUse(this->getDimension(), pck.location);
this->_inventory->hotbar().at(this->_heldItem).updateDamage();
if (Items::Hoe *usedItem = std::get_if<Items::Hoe>(&item)) {
Copy link
Member

@Trompettesib Trompettesib Dec 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be improved to handle multiple items.

break;
}

try {
Copy link
Member

@Trompettesib Trompettesib Dec 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be removed when the generation offset is fixed.

@fluffyloafie fluffyloafie merged commit 650cf88 into master Dec 11, 2023
4 checks passed
PierrickMarguin pushed a commit that referenced this pull request Dec 19, 2023
* Add hoe (wrong item for roots)

* Fix "Hanging roots" item ID (From cauldron to hanging roots (blockID/itemID problem))

* Fix clang-format
@emneo-dev emneo-dev deleted the item_hoe branch March 3, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature When we dev a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants